﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PHMEE.Videos
{
    public interface IMqttExtendManager
    {
        /// <summary>
        /// 发送主题及消息
        /// </summary>
        /// <param name="topic"></param>
        /// <param name="payload"></param>
        /// <returns></returns>
        Task<bool> SendMessageAsync(string topic, string payload);

        /// <summary>
        /// 订阅主题
        /// </summary>
        /// <param name="topic"></param>
        /// <returns></returns>
        Task SubscribeAsync(string topic, Func<string, Task> messageHandler);
    }
}
